import request from 'utils/request'

/**
 * 用户认证（登录注册
 * @param {*} data { mobile: 手机号, code: 验证码}
 * @returns promise
 */
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/authorizations',
    data,
  })
}

/**
 * 获取用户个人资料
 * @returns promise
 */
export const getProfile = () => request.get('/user/profile')
